#If WINDOWS Or XBOX Then
Imports System.IO.IsolatedStorage
Imports System.IO

#If WINDOWS Then
Imports System.Windows.Forms
#End If

Module Program

    ''' <summary>
    ''' The main entry point for the application.
    ''' </summary>
    Public Sub Main(ByVal ParamArray args As String())
        fileStorage = IsolatedStorageFile.GetStore(IsolatedStorageScope.User Or IsolatedStorageScope.Assembly, Nothing, Nothing)

#If Not Debug Then
        If fileStorage.FileExists("Sample.zip") = False Then
#Else
        If fileStorage.DirectoryExists("Sample") Then
            fileStorage.DeleteDirectory("Sample", True)
        End If
#End If

#If WINDOWS Then
        Using isolatedFileStream As New IsolatedStorageFileStream("Sample.zip", FileMode.OpenOrCreate, fileStorage)
            Using fileWriter As New IO.BinaryWriter(isolatedFileStream)
                fileWriter.Write(My.Computer.FileSystem.ReadAllBytes("DownloadedGames\Sample.zip"))
                fileWriter.Close()
            End Using
            isolatedFileStream.Close()
        End Using
#End If

#If Not Debug Then
        End If
#End If

#If Not Windows Then
        Dim gameName As String = "Sample"

        Using game As New GalgamePlayerForWindows(gameName)
            game.Run()
        End Using
#End If

    End Sub

End Module

#End If